﻿IF exists (select * from sysdatabases where name='Messanger')
BEGIN TRY
	DROP DATABASE Messanger
END TRY
BEGIN CATCH
END CATCH
GO

IF NOT EXISTS (select * from sysdatabases where name='Messanger')
BEGIN TRY
	Create database [Messanger];
END TRY
BEGIN CATCH
END CATCH
GO

Use [Messanger];
go

CREATE TABLE [MessangerClients] (
    [Key] [int] NOT NULL IDENTITY,
    [Id] [nvarchar](max),
    [LastActivity] [datetimeoffset](7) NOT NULL,
    [UserAgent] [nvarchar](max),
    [User_Key] [int] NOT NULL,
    CONSTRAINT [PK_MessangerClients] PRIMARY KEY ([Key])
)
CREATE INDEX [IX_User_Key] ON [MessangerClients]([User_Key])
CREATE TABLE [ChatUsers] (
    [Key] [int] NOT NULL IDENTITY,
    [Id] [nvarchar](200),
    [Name] [nvarchar](max),
    [Hash] [nvarchar](max),
    [Salt] [nvarchar](max),
    [HashedPassword] [nvarchar](max),
    [LastActivity] [datetime] NOT NULL,
    [LastNudged] [datetime],
    [Status] [int] NOT NULL,
    [Note] [nvarchar](200),
    [AfkNote] [nvarchar](200),
    [IsAfk] [bit] NOT NULL,
    [Flag] [nvarchar](2),
    [Identity] [nvarchar](max),
    [Email] [nvarchar](max),
    [IsAdmin] [bit] NOT NULL,
    [IsBanned] [bit] NOT NULL,
    CONSTRAINT [PK_ChatUsers] PRIMARY KEY ([Key])
)
CREATE TABLE [MessangerGroups] (
    [Key] [int] NOT NULL IDENTITY,
    [LastNudged] [datetime],
    [Name] [nvarchar](200),
    [Closed] [bit] NOT NULL,
    [Topic] [nvarchar](80),
    [Welcome] [nvarchar](200),
    [Private] [bit] NOT NULL,
    [InviteCode] [nchar](6),
    [Creator_Key] [int],
    CONSTRAINT [PK_MessangerGroups] PRIMARY KEY ([Key])
)
CREATE INDEX [IX_Creator_Key] ON [MessangerGroups]([Creator_Key])
CREATE TABLE [Messages] (
    [Key] [int] NOT NULL IDENTITY,
    [Id] [nvarchar](max),
    [Subject] [nvarchar](max),
    [From] [nvarchar](max),
    [CC] [nvarchar](max),
    [Content] [nvarchar](max),
    [When] [datetimeoffset](7) NOT NULL,
    [Room_Key] [int],
    [User_Key] [int],
    CONSTRAINT [PK_Messages] PRIMARY KEY ([Key])
)
CREATE INDEX [IX_Room_Key] ON [Messages]([Room_Key])
CREATE INDEX [IX_User_Key] ON [Messages]([User_Key])
CREATE TABLE [GroupMessageUser1] (
    [ChatRoom_Key] [int] NOT NULL,
    [ChatUser_Key] [int] NOT NULL,
    CONSTRAINT [PK_GroupMessageUser1] PRIMARY KEY ([ChatRoom_Key], [ChatUser_Key])
)
CREATE INDEX [IX_ChatRoom_Key] ON [GroupMessageUser1]([ChatRoom_Key])
CREATE INDEX [IX_ChatUser_Key] ON [GroupMessageUser1]([ChatUser_Key])
CREATE TABLE [GroupMessangerUsers] (
    [ChatRoom_Key] [int] NOT NULL,
    [ChatUser_Key] [int] NOT NULL,
    CONSTRAINT [PK_GroupMessangerUsers] PRIMARY KEY ([ChatRoom_Key], [ChatUser_Key])
)
CREATE INDEX [IX_ChatRoom_Key] ON [GroupMessangerUsers]([ChatRoom_Key])
CREATE INDEX [IX_ChatUser_Key] ON [GroupMessangerUsers]([ChatUser_Key])
CREATE TABLE [MessangerUserGroups] (
    [ChatRoom_Key] [int] NOT NULL,
    [ChatUser_Key] [int] NOT NULL,
    CONSTRAINT [PK_MessangerUserGroups] PRIMARY KEY ([ChatRoom_Key], [ChatUser_Key])
)
CREATE INDEX [IX_ChatRoom_Key] ON [MessangerUserGroups]([ChatRoom_Key])
CREATE INDEX [IX_ChatUser_Key] ON [MessangerUserGroups]([ChatUser_Key])
ALTER TABLE [MessangerClients] ADD CONSTRAINT [FK_MessangerClients_ChatUsers_User_Key] FOREIGN KEY ([User_Key]) REFERENCES [ChatUsers] ([Key]) ON DELETE CASCADE
ALTER TABLE [MessangerGroups] ADD CONSTRAINT [FK_MessangerGroups_ChatUsers_Creator_Key] FOREIGN KEY ([Creator_Key]) REFERENCES [ChatUsers] ([Key])
ALTER TABLE [Messages] ADD CONSTRAINT [FK_Messages_MessangerGroups_Room_Key] FOREIGN KEY ([Room_Key]) REFERENCES [MessangerGroups] ([Key])
ALTER TABLE [Messages] ADD CONSTRAINT [FK_Messages_ChatUsers_User_Key] FOREIGN KEY ([User_Key]) REFERENCES [ChatUsers] ([Key])
ALTER TABLE [GroupMessageUser1] ADD CONSTRAINT [FK_GroupMessageUser1_MessangerGroups_ChatRoom_Key] FOREIGN KEY ([ChatRoom_Key]) REFERENCES [MessangerGroups] ([Key]) ON DELETE CASCADE
ALTER TABLE [GroupMessageUser1] ADD CONSTRAINT [FK_GroupMessageUser1_ChatUsers_ChatUser_Key] FOREIGN KEY ([ChatUser_Key]) REFERENCES [ChatUsers] ([Key]) ON DELETE CASCADE
ALTER TABLE [GroupMessangerUsers] ADD CONSTRAINT [FK_GroupMessangerUsers_MessangerGroups_ChatRoom_Key] FOREIGN KEY ([ChatRoom_Key]) REFERENCES [MessangerGroups] ([Key]) ON DELETE CASCADE
ALTER TABLE [GroupMessangerUsers] ADD CONSTRAINT [FK_GroupMessangerUsers_ChatUsers_ChatUser_Key] FOREIGN KEY ([ChatUser_Key]) REFERENCES [ChatUsers] ([Key]) ON DELETE CASCADE
ALTER TABLE [MessangerUserGroups] ADD CONSTRAINT [FK_MessangerUserGroups_MessangerGroups_ChatRoom_Key] FOREIGN KEY ([ChatRoom_Key]) REFERENCES [MessangerGroups] ([Key]) ON DELETE CASCADE
ALTER TABLE [MessangerUserGroups] ADD CONSTRAINT [FK_MessangerUserGroups_ChatUsers_ChatUser_Key] FOREIGN KEY ([ChatUser_Key]) REFERENCES [ChatUsers] ([Key]) ON DELETE CASCADE
CREATE TABLE [__MigrationHistory] (
    [MigrationId] [nvarchar](255) NOT NULL,
    [CreatedOn] [datetime] NOT NULL,
    [Model] [varbinary](max) NOT NULL,
    [ProductVersion] [nvarchar](32) NOT NULL,
    CONSTRAINT [PK___MigrationHistory] PRIMARY KEY ([MigrationId])
)
BEGIN TRY
    EXEC sp_MS_marksystemobject '__MigrationHistory'
END TRY
BEGIN CATCH
END CATCH

INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion]) VALUES ('201211201617208_MessangerStart', '2012-11-28T12:44:26.292Z', 0x1F8B0800000000000400ED1DCB6EE436F2BEC0FE4343A7EC0271DBBDC0C019B41378DAE3ACB1B13D703BC971404B6C591B3D7A25B6C7FEB63DEC27ED2F84D483CDA744EAD5EA642E83698A2C168B55C562B1AAFCFFFFFE6FF9C36B14CE5E609A05497CE19C9D9C3A3318BB8917C4FE85B3439B6FCF9D1FBEFFEB5F961FBDE875F64BD56F41FAE1917176E13C23B47D3F9F67EE338C407612056E9A64C9069DB84934075E325F9C9E9ECFCF4EE710837030ACD96CF9B08B5110C1FC07FEB94A62176ED10E84B78907C3AC6CC75FD639D4D91D8860B6052EBC70D6CF208557701B266FD03BB902085CBA2ECC326776190600E3B386E1C612B9D3EF08720E9D164FFC112388DE1EDFB6309FFCC2B9C57380D887E92A0C608CD8CEB8FBBFE01BD7809B3EA5C916A6E8ED016E4A10B893339BF303E7E2483A8E1D44F0B8706E62F48F8533BBDB8521780A71C30684197466DB77EFD72849E18F30862940D0FB04108229DEA71B0FE6EB28E9F17EFBCE8C24DFCD4F1784247310C70902086FBA84B980E78D57A1B94629E61E67761DBC42EF2718FBE899A27A0B5EAB16FC5F67F6731C6066C38350BA83ECD28ADFF553FE043274E9A2E0255F6131396608F88859EB7EB3C9205210AB1EE4CF194C2F7DB2BF632F86CC6CB0D702903BF012F8F9FE28C039B30718E61FB3E7605B48C689C0C79F8B8ED769123D24A1CCE7F9F7CFEB6497BA78F6C7A4A6D323487D427216C5E57C2F4866E295E3F355B83A0A179EA6233F927F4717827F82EC79F449D7201C5FDCC94A092F65D997249D96EAB4569A04D8DDCEF3A15707CA682BB038EC324B1D28326E826C19B7BBB45C6E7E3BC8BC37199EB99AF54382953388AD29761D02DF16F3AE7853DD3932E37F8C40108E3E2BDE262F0AE2AE1B75937DC067C65ECC8CE168CD046C79C7D0C5A75A719067FD990C9535506B3254768529BAF75FF0EA7F4C93DDB601D3BCCF67D23DCD94A8B21DF4B872BD6C9135C793D0A20ECDFC7B139645275B242FC330F96243D3724013CA6CB726CCB9BEAA05D85B9139E0AF66E46007750BEBB0FB61B70A93AC85F213A03C26DBC0B5C4FDBC2BEABFC2106FDDF824FB94062F606F97B43E78626C28C21546A376050546CC02DE75DDF114022C3575F2A504D3A4EE4AED358CB6D35E966B34A3F1795D10C40475DA558B75D9A309E1AA9B2DAED5E9DBDF39DD80A8709A9BE29943F1610DA63EFC5C1C282286D507F50947BFDA1ECAC6EC69663834904DCF8976E7AE0FBF1EB887778AAE774FFFC616FDE8F3121E1C7DD2D56AFC2993181DC23FFCEB338C45ABADA593FB214922EB23D5D25D6D772C97DAB5BDFE55AA38493BF7E33CC7609537E0B25D8B8BB593FC32CB1237C87150DE6F78EB845FDBC7D89B59982A052FCB270C66E25D88826D18B818C10BE7EF1211CD26A2E7A362A28298B5F32CE70C2DAC4854594186484B26D1008411ED29539A9C9E9C9C49B3E08314A6E43C0321D64C194A411023F9D40D6237D882D0082161B4E9A94D76894E247EB9825B189373D788EC2618B0570319113A9F60583491AB3DA39536AC210F8806ED006C26FAB6C6913CAAAA6BB194F5B6809D0FAD572EDBE2A644ED59B0444446932791AA2613535BE07032549DA74DBBCB1FAEBD300CEFA93E8C1E16D018935B588A9ACC4B8DBE29285C2BAB677873E760760EFB28D388AB32A843816B19E4D4861CCA472043729C896CB8BC8FAF6008119C91D76A127AB602990B3CF96E816D68AF4FD348B18C510D23C54E4D4D448B5B0BB910E31130951893DC945FC548B962D01A22EAD42F1F1EF777201D334ABCC7432A9D617A3805C73540A95EC2F4604A4DD10067EF555443F2651666C82CC0D139A4991106FE6B9123ECEE8874817B1A493C667719642096EB11659AA7883DB5A80FBC9150CA7BA2CD4DB11379C42BE1F094A95CEE8D8451DD6B2C6E369DC8225C6186A2CADEBDA4A186FA526370AD6130DEEB83A6F54B1799461A765878A113F5EB96CD8A66DBBCEDAA399361781130D5A196CAB347AD399EBAE4227B6A28A23536CDCD4D6619F4EC372189CAAEEC4092CAE94ACD17FA6D392FB20ECA86E55C939EB0BC05DB6D10FB4CBA42D9325B17B90AAB6FD7F69908510163EE668A84048A2D9D091F1B587684AFE499C283D7419A219221F104C8A3C0CA8BA46EA6C65A351D6FB3C9BB56593A557FF2FFF25D4A93B7219979B2955B02BBC60B8D88A59CBFEB894AA60EC28C24928010A4AA67C45512EEA2B8C67AD78F27CF7BEC70F2DB7C341F83CBC2E1BF984364B21758704CB31D2C893EB9F06988B49C0BFB245D4024F6906E703CB719F1A24E3B77E144957AB3E143F5F869726111C9C58E2F5ACC211441FB2C84A2C51C421181CF42285AEC7060C3E9456CD86F87945036024F8457B55BD0AD0C97E72857B65970401EB8CE7140DE620E8146BFB34068A3052717D1EC1C33174DE6308A60761644D162234F557C082F5555AB39A432D89C05533659D1A4081D17A85234DAC0A962C7794055EB64147A6926F7ABD195D7371B95AE0130944EEF574F74D7F155E82D0BA36A33875286DEB240CA26731834929685421BCDE1D0C858160E6DB4902B263496932CA6DD82CECCAB3647EBD241342DDB8BDEEEFB1356318830076724A5AA91D334B968881E776E578D16475D1E72C71D75798B05BBAD04365B598DAE42E1381055A38548E7A16D9C3CE72DE610E82B360B8434EA04E6686E3DBCFF42217EBAA701EBD351185F7F12D65E7588F74615635DFFC02093D64C7457CF00E9B73A7F17AC4074C353FB0A688EA79E93F4788A3EACAE6C5279FEED19A41A69C11AF2836E23CDF90784297205FF2C71ECFCD05A5FD82B8A853D374C5E454C5C37486E6EB10B3DC0A8BB5B706B2F4B177373691EC9E75C74716618F797C023FEE6F55B86609433D5C9FA3F61F5B25F75B80571B081197A4C7E83719EFF76DEBEAE0FCDD7C8322F9C7C719F80D0A13163C5366F8FE69FC42F2075B1607F1381D7BFF5512DC2C318921A4E494F85763A21B8971D8698B5181D4F619A9118434E3C6D9F11DC692FD91A309D00B1755D3A6324D76A194CA27AA8BFA202655F7FA5598A146CC05441E98BB584E22A7D81E56AA73C05F66B65EBA6A891EA5A16A5138F71A54E3A4112CA97B4A19558BAA419C611157D184445F727D52AD5DC5578F85A0C6D3882ABC3A044EBDC1A2BA1CC425F8B15AA28B4E27FA982422C61F6AE6579841ACB4786720C39DD53B68585FCEA4EB0D89CE94E80F679D0DDC0F0B9CD9D60B1F9CA1DEF0AFBABBB218F5B5F10BA8A89895FD44C741A5C15EA013AD741B3D0F1D3B537FB782C86BB84357A18BF5279102A2FBE52B92595FBCADC2A42730F9248A50DC6ED963BD62D3F4B13A337784696711696CE973B7EA6A4710D043B1E53E6C1EA62D93B255D1E1BA7E8A28DB4550C0ECD2B6659FB6D36D38449FC96F9DC3DD4BE1833DDDA381F7F02DC30C499345D561857431872C2B4CE90C6888D3E94C5D0568BE28AA647CE266FFFD89491591C4F1BA3FED0ACA97A889FBE393D5DC63C90F1D48E2FA7A5326B02998E53599E9932E5D99F425D4A1B7024FAB2267CED1835E574B8720ABAD29C29A7A52CFF6886E5C2942B177F0A5D29457E1E89AEFC631995D361CA29A84A739E1C55550AF1BAF46956ACE720EEBFA2FC14EB8DDFBF4EE8FCF545B4EE85E33D25984F8A870EA1935C60433B6FC1F1FA598BEFAA392B8A5B4C562A7DFD6C6587DA256A6AEB2827F5615D5D2FED348A4A380D8B32A6A7AAB70A8F7D3F1F9656517B84CEEC303A6B42A9EAD8894A0B3BA4160D6C41FA6858E3203575584650949D905554CDF35D4D1115E9C899642DB63E88C1290F55D6774FA4E8ADCC581BA4D5AE76450E6D7F8BEDA3B4581F7B3CEC42EB5DE476151A35794EC3EC7FFD11D398F3392CF9AA025F76E45367610DAA3726423CA1EAA26155C709F0DB9929CD643BA52FA219F35A6DDEE7785C764892592AB7A968B58529C9164391CC98C9A6A1C906219845C94539E714DFA8773109222E7E5DC12CF0F72096E51FB265EFD2B4CF4DBC49AA8BBD8051D545CAF145C02389CF290A36C045F833C980CEFFD2D32F20DC41925DF304BD9BF87E87B63B84970CA3A790731010D740DDFC795D491EE7E5FD36FF83437D2C01A31990B8EBFBF8C32E083D8AF7B52274510382F81CCA007CB2978804E2FB6F14D25D121B022AC9475D258F30DA861858761FAFC10BD4E3D64C439E62CBAB00F82988580A162D342710CFCC4C81276047ECE7C33F31BB7AD1EBF7BF03D7C40E3B26850000, '4.3.1')

ALTER TABLE [Messages] ADD [IsNew] [bit] NOT NULL DEFAULT 0
INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion]) VALUES ('201211210925387_IsNewInMessage', '2012-11-28T12:44:26.310Z', 0x1F8B0800000000000400ED1DDB6EE336F67D81FD07434FDD051A275E60900E9C161967D20DB6490671DA3E0E188956B4D5C52BD199E4DBF6613F697FA1A42E34AF12A99BE5765E06638A3C3C3C3C3792E79CFCFFBFFF5BFEF01A85B317986641125F386727A7CE0CC66EE205B17FE1ECD0E6DB73E787EFFFFA97E5472F7A9DFD52F55B907E78649C5D38CF086DDFCFE799FB0C23909D44819B2659B241276E12CD8197CC17A7A7E7F3B3D339C4201C0C6B365B3EEC62144430FF817FAE92D8855BB403E16DE2C1302BDBF197750E75760722986D810B2F9CF53348E115DC86C91BF44EAE000297AE0BB3CC995D8601C0F8AC61B8B144EEF43B829C43A7C5137FC408A2B7C7B72DCC27BF706EF11C20F661BA0A031823B633EEFE2FF8C635E0A64F69B285297A7B809B1204EEE4CCE6FCC0B938928E6307113C2E9C9B18FD63E1CCEE7661089E42DCB00161069DD9F6DDFB354A52F8238C610A10F43E0184608AF7E9C683F93A4A7ABCDFBE3323C977F3D30521C91CC4718200C29B2E612EE079E35568AE518AB9C7995D07AFD0FB09C63E7AA6A8DE82D7AA05FFD799FD1C0798D9F02094EE20BBB4E277FD943F810C5DBA2878C957584C8E19023E62D6BADF6C328814C4AA07F97306D34B9FECEFD88B21331BECB500E40EBC047EBE3F0A70CEEC0186F9C7EC39D816927122F0F1E7A2E3759A440F4928F379FEFDF33AD9A52E9EFD31A9E9F408529F909C457139DF0B929978E5F87C15AE8EC285A7E9C88FE4DFD185E09F207B1E7DD23508C71777B252C24B59F62549A7A53AAD95260176B7F37CE8D58132DA0A2C0EBBCC52078A8C9B205BC6ED2E2D979BDF0E32EF4D8667AE66FD9060E50C626B8A5D87C0B7C5BC2BDE54778ECCF81F231084A3CF8AB7C98B82B8EB46DD641FB0CDD88B99311CAD9B803DEF18BAD8AA15863CEBCF65A8BC815A97A1F22B4CD1BDFF8257FF639AECB60D98E67D3E93EE69A64495EDA0C795EB658BAC399E84167568E6DF9BB02C3AD922791986C9171B9A96039A5066BB3561CEF5552DC0DE8BCC017F75230733D42DBCC3EEC66E1526590BE52740794CB6816B89FB7957D47F8521DEBAF149F6290D5EC0DE2F696D7862EC28C21546A376050546CC02DE75DDF114022C3575F2A504D3A4EE4AED358CB6D31E966B34A3B1BD2E0862823AEDAAC5BAECD18470D5CD16D7CAFAF667A71B1015ACB9299E39141FD660EAC3CF85411131AC3EA82D1CFD6A6B948DD9D3CC7168209B9E13EDECAE0FBF1ADCC35F8AAE774FFFC61EFDE8F3121E1C7DD2D56AFC2993181DE27EF826BB835FBADAF15F9F612CBA7E2D6FCA1F9224B2B6CB9677DE76B6BD54D1ED95B8524F4A2ABE9F1B780C56798C2EDBB5B858DFB45F6659E206390ECA4312EFE2F06BFB187B330B7FA71008D94C6149D88528D886818B11BC70FE2E11D16C226A64151315C4AC9D673967686145A2CA9532445AF2AB06208CE89499D2E4F4E4E44C9A055B639812A30842ACDE3294822046B2E90E6237D882D0082161B4A9E927BB442712BF5CC12D8C89F13622BB0906ECF9424684CE2778274DE46ACF68A5236CC803A2573C009B891764E3481E55D5B558CA7A5BC0CE87D62B971D7A53A2F62C582222A3C99348559389A92F703819AAEC69D3EEF2C6B51786E1AFBB0FA3870534C6E41696A226F352A76F0A0AD7CAEB19DEDD39989FC3BEEC34E2AA8C0C51E05A464AB52187F225C9901C67221B2EEFE32B18420467E4C99BC4AFAD40E6024F3E5B601FDAEBD335522C6354C748B1535313D1E2D4424ED578044C25C624C7ED5731DCAE18B48688BE0C94AF97FB33908E1925DEE32195376A7A3805C73540A99ED3F4604A4DD100677F35A986E4CB2CCC905980A3BBD56646185C828B1C617746A40BDCD348E231BBC32003B15C8F28D33C45ECA9452FD21B09A53C27DA9C143B91473C120E4F99EADEBE9130AA738DC5C9A613598423CC5054D95F2F69A8A13ED4181C6B188CF7FAA069FDD241A691861D165EE844FDBA65B7A2D9376FBB6ACE65185E044C75A8A5F2EC516B8EA72EB9F0A01A8A689D4D7377935906B5FD262451F9951D48525DBA52F7857E5BCE8BD485B26139D7E4382C6FC1761BC43E93F350B6CCD645C2C3EADBB57D3A4354C098BB9922AB81624B67C26603CB8EF095BC7578F03A483344D22C9E007914587991D4CDD459ABA6E37D3679D72A4FA7EA4FFE5F3E6E69923F24374FF6724B60D778A111F194F3C74151C9D44198916C14108254F516B94AC25D14D778EFFAF1E48D901D4E7E9B8FE603795938FC1773884C0A040B8E69B68325D127173E0D919673619FA40388C41ED2098EE736235ED469E72E9CA8526F367CA81E3F4D2E2CC2C1D8F1458B398422F29F8550B4984328C2F85908458B1D0E6C4CBE880DFBED9012CA86F189F0AA760BBA9531F71CE5CA360B0EC8A3DF390EC85BCC21D0107A16086DB4E0E422249E63E6A2C91C461111CF82285A6CE4A90A32E1A5AA6A35875446ACB360CA262B9A14F1E702558A461B3855003A0FA86A9D8C422FDDE47E35BAF2F866A3D2350086D2E9FDEA89EE3ABE8ADF6561546DE650CAF85D1648D9640E8386E3B25068A3391C1A5ECBC2A18D1672C5C4D77292C5B45BD09979D5E6685D5E104DCBF7A2A7FBFE84558C44CCC11949A96AE4345D2E1AE7C7D9EDAAD1C2D4E5717B9CA9CB5B2CD86D25B0D9CA6A74154FC781A81A6D4C531E1FC7DBA5BCC9422DE4E1719C4EC85BCC21D09770160869D409DDD19C9CF83B108508EB9E17AC2DAC30BEDE9AD61E97C80D902AD8BBFE914226AD99F8AF9E01D26F75FEB65881E886A7F625D11C4F3D27E9F114EFC1BAB249F57A60CF20D5480BD6901F851B69CE3F424C912BF8A78D63E787D6FAC25E512CECB961F22A62E2BA41BA2A17BB500346AFCC85ABF165794DDD5C2348BAB72EBA38338CFB4BE0913BEBF55B86609433D5C9FA3F61151D5075B80571B081197A4C7E83719E8877DEBEC0104D1CC9322F9C7C95A180D0A13175C636819026C2C42F2075B1607F1381D7BFF551B6C2C318926252494F157F3A21B8971D8698B5181D4F859C911843CE806D9F9ADC692FD962349D00B105663A6324178D194CA27A2804A302655F08A6598A146CC09463E98BB5842A2F7D81E58AB83C05F66B650BB8A891EA5A9FA5138F7135573A4112EAA8B4A1955843A519C611559F184445F727D52AD5DC5578F8A2106D38822B08A144EBDC1A2BA1DE435F8B15CA39B4E27FA994432C61F6AE659D861ACF4786720CC9E553F6858544EF4EB0D8E4ED4E80F609D9DDC0F049D61D6D069338DD4662D8A4E98E878DFDD9DF5048AC4F185DE5CCE462D54CF61AEE3AD40374770FCD52CB4FD7DE6FE4B118EE14D77845F995CA835079F195CA2DA9DC57FA58111F7C906C2E6D4470B704B66E49629A40C1C1D3C28C53C17497C1E3A76B1A1762B0E3316532AE2EA0BE53E6E7B1718A2EE4495B4AE1D0BC62563AA0CD669A3089DF32A9BC87021C63E67C1B17059800370C6193A6CB0AE36A08434E98960D690CF9E843590CEDB5288E687AE46C8A071C9B32320B046AE3D41F9A35552FF9D377A7A7CB9807729EDAF1E5B454664D24D4712ACB3353A63CFB53A84B69038E445FD6C4BF1DA3A69C0E574E41579A33E5B494E51FCDB15C9872E5E24FA12BA5D0D123D1957F2CA7723A4C39055569CE93A3AA4A21E097BEED8A4525C4FD57D4C0626FE3F7AF13BAFBFA22DCF7C2F19E12CC27C54387D049AEF2A19DB7E078FDACC577D59C15C52D262B95BE7EB6B243ED1235057E9493FAB0AEB898761A45399E864519D353D55B85C7BE9F0F4BAFA83D426776189D35A15475EC44A5851D528B06B6207D34AC7190C23E2C23286A5FC82AAAE6F9AEA6928B6472265910AE0F6270CA43957ADE13297AAB75D60669F555BB2291B7BFC5F651DFAC8F3D1E76A1F557E4766522358952C3EC7FBD89694C1A1D967C5595313BF2A9D3B806D51B13219E50FAD1B0B4E404F8EDCC9466B29FD217D18C79AD3671743C2E3B24C92C95DB54B4DAC294648BA14866CC64D3D0648310CCA2EEA39CB48A4FD4BB98041117BFAE6016F87B10CBF24FF2B26769DAE726DE24D5C15EC0A8EA22250923E091CCE914051BE022FC99A450E77FB3EA1710EE2049CF7982DE4D7CBF43DB1DC24B86D153C85D1090AB81BAF9F3E2963CCECBFB6DFE578FFA580246332071D7F7F1875D107A14EF6B45E8A20604B9732823F8C95E2212C9EFBF514877496C08A8241FBD2A7984D136C4C0B2FB780D5EA01EB7661AF2145B5E05C04F41C452B068A149857866660A3C013B623F1FFE89D9D58B5EBFFF1DE024C346F0850000, '4.3.1')

ALTER TABLE [Messages] ADD [FromEmail] [nvarchar](max)
INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion]) VALUES ('201211231441414_FromEmailInMessage', '2012-11-28T12:44:26.323Z', 0x1F8B0800000000000400ED1DCB6EE436F2BEC0FE4343A7EC0271DBBDC0C019B41378DAE3ACB1B13D703BC971404B6C591B3D7A25B6C7FEB63DEC27ED2F84D483CDA744EAD5EA642E83698AAC2A16AB8A45B2AAFCFFFFFE6FF9C36B14CE5E609A05497CE19C9D9C3A3318BB8917C4FE85B3439B6FCF9D1FBEFFEB5F961FBDE875F64BD56F41FAE1917176E13C23B47D3F9F67EE338C407612056E9A64C9069DB84934075E325F9C9E9ECFCF4EE710837030ACD96CF9B08B5110C1FC07FEB94A62176ED10E84B78907C3AC6CC75FD639D4D91D8860B6052EBC70D6CF208557701B266FD03BB902085CBA2ECC326776190600D3B386E1C692B8D3EF08710E458B117FC404A2B7C7B72DCC915F38B71807887D98AEC200C688ED8CBBFF0BBE710DB8E9539A6C618ADE1EE0A604813B39B3393F702E8EA4E3D841848E0BE72646FF5838B3BB5D1882A710376C40984167B67DF77E8D9214FE0863980204BD4F002198E275BAF1603E8F921FEFB7EFCC58F2DDFC7441583207719C2080F0A24B940B74DE7815996B9462E97166D7C12BF47E82B18F9E29A9B7E0B56AC1FF75663FC70116363C08A53BC84EADF85D8FF22790A14B17052FF90C0BE45820E02316ADFBCD268348C1AC7A903F6730BDF4C9FA8E3D1982D960AD052077E025F0F3F5518073660F30CC3F66CFC1B6D08C13418E3F171DAFD3247A484259CEF3EF9FD7C92E7531F6C7A4A6D323487DC27296C4E57CAF4866EA95D3F355B93A2A1746D3511EC9BFA32BC13F41F63C3AD23508C757773253224B59F62549A7653AAD8D260176B7F37CE8D581325A0AAC0EBBCCD2068A829B205BC1EDAE2D979BDF0E82F726C3982BAC1F126C9C416CCDB1EB10F8B69477A59BDACE9105FF6304827074AC7899BC2888BB2ED44DF601EF197B353386A37513B0E71D4317EF6AC5469EF5E73254DE40ADCB50F915A6E4DE7FC1B3FF314D76DB064AF33E9F49F7345392CA76D0D3CAF5B225D69C4EC28B3A32F3EF4D54169D6C89BC0CC3E48B0D4FCB014D24B3DD9A28E7FAAA2660EF45E680BFBA91836DD42DBCC3EE9BDD2A4CB216C64F80F2986C03D792F6F3AEA4FF0A43BC74E3B3EC531ABC80BD5FD27AE389B1A30857988CDA191414311378D775C55308B0D6D4E997124C93B92BADD730D64E7B58AEB18CC6FB75C11013D269572DD5658F2682AB6EB6B456BB6F7FFB7403A1C26E6E4A670EC5873594FAF073B1A18814561FD43B1CFD6ABB291B8BA799E3D0C036BD24DAEDBB3EFCBAE11EFE5274BD7BFA37F6E847C74B64F020480F73A25BADC64799C4E81037D337D91DFCD2D583F8F519C6A2D3D9F28EFE2149226B8FC0F2B6DDCEAB283787F6DB87D2424B9B4B3F77FF18ACF2005FB66B69B1BEE3BFCCB2C40D721A94C733DEB9E2E7F631F666169E56A110F20689356117A2601B062E26F0C2F9BBC4443344747B57202A98598B6739677861C5A2CA8933245AF2E806608CE80E9AF2E4F4E4E44CC282FD009892ED1884D8BC652805418C64A72188DD600B42238284D1A64E0759258A48FC7205B730266E8311DB4D28604F363221149FE01735B1ABBDA0952EB8A10C88FEF80062265ECD8DA379D454D75229DB6D813A1F5ACF5C3E4A9832B567C51209194D9F44AE9A20A6BEC0E174A8DA4F9B5697DF5C7B1118FEA2FD30765820634C6961396A82973A7D5330B8565ECFF0EECEC1FC1CF64DA99156654C8A82D63246AB0D3B946F5886EC3813C570791F5FC1102238238FED24726E05321778F2D902FBD05E9FAE91621AA33A468A959A9A8A16A71672AAC623602A0926396EBF8A817EC5A03544F44DA27C37DD9F8174C228C91E0FA9BCCBD3C32924AE014AF590A707535A8A0638FB4B5135245F166186CD021CDD7D3A33C2E0FA5D9408BB33229DE09E47928CD91D061988E57C449DE63962CF2D7A85DFC828E539D1E6A4D8893DE2917078CE542F068D8C519D6B2C4E369DD8221C6186E2CAFE7A49C30DF5A1C6E058C350BCB7074DF3970E328D3CEC30F1C226EAE72DBB15CDBE79DB59732EC3F02A606A432D8D678F56733C73C90526D57044EB6C9ABB9BCC34E8DE6FC212955FD98125D5A52B755FE8B7E5BC489A281B96734D76C5F2166CB741EC33D91665CB6C5DA45AACBE5DDB275244058CB99B29F22928B51413DE36B0EE085FC95B8707AF83344324C1E309904781951749DD4C9DB50A1DEFB3C9AB56793A557FF2FFF2594D937622B979B2975B02BBC6138D88A79C3F4B8A46A60EC28CE4C18010A4AA57D05512EEA2B8C67BD78F27AF93EC70F2DB7C341F42CCC2E1BF984364922F58704CB31D2C893FB9F26998B49C0BEB241D4024F1904E70BCB419C9A2CE3A7791449579B39143F5F8694A611188C68E2F5ACC211439072C84A2C51C429140C042285AEC6860B301446AD86F87D4503680508457B55BF0AD8CF6E73857B65948401E77CF4940DE620E8106EFB34068A3852417C1F89C30174DE6308A587C1644D162A34F55780BAF5555AB39A432B28205533659F1A4887C17B85234DAC0A942DF794055EB640C7AE926F76BD195C7371B93AE0130944DEFD74E74B7F155E4300BA36A338752460EB340CA26731834109885421BCDE1D0C05E160E6DB4D02B26B297D32CA6DD82CFCCAB36C7EBF282685ABE173DDDF7A7AC620C640ECE484B5523A7E972D108436EDFAE1A2DB6BA3C6290DBEAF2163B088A4D8A69B610DD9520B22BABD1556C1E07A26AB4D9E6F2583B7E8FCB9B2C4C4C1E6AC7D997BCC51C027D55678190469D021FCD298CBF4F519803DD5385F56E2D8CAFDF996B8F5EE4364915B25EFFE021B3D6CC94AC9E01D22F75FE4E5981E846A7F655D29C4EBD24E9E914EFD4BA8A49F512612F20D5480BD1901F981B79CE3F684C512AF86792639787D6F6C2DE502CECA561F22662E2B641BA7617BBD00D8C5EBF0BD7ECCBF2CABBB9D29174075E74716698F697C023F7DFEBB70CC12817AA93F57FC22AD2A0EA700BE2600333F498FC06E33C9DF0BC7D99249AFE92655E38F95A4901E1436302906D1A244DE7895F40EA62C5FE2602AF7FEBA3F88687292425B1929EEA16752270AF3B0C336B293A9E3A3F2309869CC7DB3EC1BAD35AB225753A0162CBE474A6482E7D339846F550CE4605CABE9C4DB31629C480292AD3976809B56AFA02CB95A2790AECE7CA96A15113D5B5CA4C2719E3F20C3B4112AAC1B4E1955809A619C611D5D018C444F7A7D52AD3DC5579F8D2166D24822B6BA124EBDC9A2AA16A455F93158A52B4927FA920452C51F6AE65B5891ACF4786720C29F253F6858574F54EB0D814F4CE80FA33F7FB54F16E60F8F4EF8E3B1093D2DD46FFD874EE8E4797FD4D82A1CA599F57BA6AADC935AD992637DC9CA807E86E329A6D008FAEBD17CA5331DC99B0F1C2F32B9707E1F2E22B975B72B9AFC4B62272F9207966DA58E56EA975DDD2D734218C8327AC1927A9E9AE96C74F24352E11612763CA34615DA87FA79CD46393145D3096C2E2D585BD8C9AA16E50D4A0CD629A0889DF32DDBD87D2206366A31B972B9880340CB1274D5714C6B510869230AD3DA43180A40F6331B4D7A238A2E989B3296B706CC6C82CACA88D537F68D154C5054CDF9D9EAE601EC8796A2797D33299357155C7692CCF4C85F2EC4F612EA50538127B59134D778C96723A5239055B692E94D332967F34C772612A958B3F85AD9402518FC456FEB19CCAE908E5144CA5B94C8E6A2A85F061FAB62B96BB10D75F519D8BBD8DDFBF4EE8EEEB8BE0E10BC77B4AB09C140F1D4227B9FE88166F21F17AACC57715CE8AE316C84AA3AFC75676A89DA2A6F49012A90FEBCA9E69D1280A05354CCA989FAADE2A3AF6FD7C587A45ED093AB3A3E8AC89A4AA63272E2DEC885A348805E9A3118D83941C620541519543365135CF77353566A42D6792A5EAFA6006673C5449F13DB1A2B72A6C6D88565FB52B528CFB9B6C1F95D7FA58E361275A7F456E57C052937635CCFAD76F318D29A8C3B2AFAA7F66C73E7552D8A0766322CC138A521A16BD9C80BC9D99F24CF653FA629AB1ACD5A6A18E2765876499A5719B8A555B98B26C3114CB8C856C1A966C10865954A4945360F1897A179320E2E2D715CC027F0F6259FE9962F62C4DFBDCC49BA43AD80B14555DA49463043C92879DA260035C843F9384ECFCAF69FD02C21D24C93E4FD0BB89EF7768BB4378CA307A0AB90B02723550873F2FBBC9D3BCBCDFE67F8FA98F2960320312777D1F7FD805A147E9BE56842E6A40903B87321F80AC25227901FE1B857497C486804AF6D1AB9247186D430C2CBB8FD7E005EA696BE621CFB1E55500FC14442C078B169AA288313328300276C41E1FFE89C5D58B5EBFFF1D2DCCE7FD04870000, '4.3.1')

EXECUTE sp_rename @objname = N'ChatUsers', @newname = N'MessangerUsers', @objtype = N'OBJECT'
INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion]) VALUES ('201211241845003_RenameChatUsersToMessangerUsers', '2012-11-28T12:44:26.349Z', 0x1F8B0800000000000400ED1DDB6EE336F67D81FD07434FDD051A275E60900E9C161967D20DB6490671DA3E0E188956B4D5C52BD199E4DBF6613F697FA1A42E34AF12A99BE5765E06638A3C3C3C3C3792E79CFCFFBFFF5BFEF01A85B317986641125F386727A7CE0CC66EE205B17FE1ECD0E6DB73E787EFFFFA97E5472F7A9DFD52F55B907E78649C5D38CF086DDFCFE799FB0C23909D44819B2659B241276E12CD8197CC17A7A7E7F3B3D339C4201C0C6B365B3EEC62144430FF817FAE92D8855BB403E16DE2C1302BDBF197750E75760722986D810B2F9CF53348E115DC86C91BF44EAE000297AE0BB3CC995D8601C0F8AC61B8B144EEF43B829C43A7C5137FC408A2B7C7B72DCC27BF706EF11C20F661BA0A031823B633EEFE2FF8C635E0A64F69B285297A7B809B1204EEE4CCE6FCC0B938928E6307113C2E9C9B18FD63E1CCEE7661089E42DCB00161069DD9F6DDFB354A52F8238C610A10F43E0184608AF7E9C683F93A4A7ABCDFBE3323C977F3D30521C91CC4718200C29B2E612EE079E35568AE518AB9C7995D07AFD0FB09C63E7AA6A8DE82D7AA05FFD799FD1C0798D9F02094EE20BBB4E277FD943F810C5DBA2878C957584C8E19023E62D6BADF6C328814C4AA07F97306D34B9FECEFD88B21331BECB500E40EBC047EBE3F0A70CEEC0186F9C7EC39D816927122F0F1E7A2E3759A440F4928F379FEFDF33AD9A52E9EFD31A9E9F408529F909C457139DF0B929978E5F87C15AE8EC285A7E9C88FE4DFD185E09F207B1E7DD23508C71777B252C24B59F62549A7A53AAD95260176B7F37CE8D58132DA0A2C0EBBCC52078A8C9B205BC6ED2E2D979BDF0E32EF4D8667AE66FD9060E50C626B8A5D87C0B7C5BC2BDE54778ECCF81F231084A3CF8AB7C98B82B8EB46DD641FB0CDD88B99311CAD9B803DEF18BAD8AA15863CEBCF65A8BC815A97A1F22B4CD1BDFF8257FF639AECB60D98E67D3E93EE69A64495EDA0C795EB658BAC399E84167568E6DF9BB02C3AD922791986C9171B9A96039A5066BB3561CEF5552DC0DE8BCC017F75230733D42DBCC3EEC66E1526590BE52740794CB6816B89FB7957D47F8521DEBAF149F6290D5EC0DE2F696D7862EC28C21546A376050546CC02DE75DDF114022C3575F2A504D3A4EE4AED358CB6D31E966B34A3B1BD2E0862823AEDAAC5BAECD18470D5CD16D7CAFAF667A71B1015ACB9299E39141FD660EAC3CF85411131AC3EA82D1CFD6A6B948DD9D3CC7168209B9E13EDECAE0FBF1ADCC35F8AAE774FFFC61EFDE8F3121E3CC8A48739D1AD56E34F99C4E81037D337D91DFCD2D583F8F519C6A2D3D9F28EFE2149226B8FC0F2B6DDCEAB288D437BF3A1D4D09271E9E7EE1F83551EE0CB762D2ED677FC975996B8418E83F278C63B57FCDA3EC6DECCC2D32A04423690581276210AB661E062042F9CBF4B44349B889A77C54405316BE759CE195A5891A872E20C91963CBA010823BA83A634393D39399366C17E004C89390621566F194A411023D969086237D882D0082161B4A9D34176894E247EB9825B1813B7C188EC2618B0271B19113A9FE0173591AB3DA3952EB8210F88FEF8006C265ECD8D23795455D76229EB6D013B1F5AAF5C3E4A9812B567C11211194D9E44AA9A4C4C7D81C3C950654F9B769737AEBD300C7FD17E183D2CA03126B7B0143599973A7D5350B8565ECFF0EECEC1FC1CF64DA91157654C8A02D73246AB0D39946F5886E43813D970791F5FC1102238238FED24726E05321778F2D902FBD05E9FAE916219A33A468A9D9A9A8816A71672AAC623602A3126396EBF8A817EC5A03544F44DA27C37DD9F8174CC28F11E0FA9BCCBD3C32938AE014AF590A707536A8A0638FB4B5135245F666186CC021CDD7D3A33C2E0FA5DE408BB33225DE09E46128FD91D061988E57A4499E629624F2D7A85DF4828E539D1E6A4D8893CE2917078CA542F068D84519D6B2C4E369DC8221C6186A2CAFE7A49430DF5A1C6E058C360BCD7074DEB970E328D34ECB0F04227EAD72DBB15CDBE79DB55732EC3F02260AA432D95678F5A733C75C90526D55044EB6C9ABB9BCC32A8ED372189CAAFEC4092EAD295BA2FF4DB725E244D940DCBB926BB62790BB6DB20F6996C8BB265B62E522D56DFAEED1329A202C6DCCD14F914145B3A13361B587684AFE4ADC383D7419A2192E0F104C8A3C0CA8BA46EA6CE5A351DEFB3C9BB56793A557FF2FFF2594D937622B979B2975B02BBC60B8D88A79C3F4B8A4AA60EC28CE4C18010A4AA57D05512EEA2B8C67BD78F27AF93EC70F2DB7C341F42CCC2E1BF984364922F58704CB31D2C893EB9F06988B49C0BFB241D4024F6904E703CB719F1A24E3B77E144957AB3E143F5F86972611188C68E2F5ACC211439072C84A2C51C429140C042285AEC7060B301446CD86F8794503680508457B55BD0AD8CF6E72857B65970401E77CF7140DE620E8106EFB34068A3052717C1F81C33174DE6308A587C1644D162234F55780B2F5555AB39A432B28205533659D1A4887C17A85234DAC0A942DF794055EB64147AE926F7ABD195C7371B95AE0130944EEF574F74D7F155E4300BA36A338752460EB340CA26731834109885421BCDE1D0C05E160E6DB4902B26B297932CA6DD82CECCAB3647EBF282685ABE173DDDF727AC620C640ECE484A5523A7E972D10843CE6E578D16A62E8F18E44C5DDE62074161A498660BD65D092CBBB21A5DC5E67120AA461B3397C7DAF1362E6FB2503179A81DA75FF2167308F4559D05421A75027C34A730FE3E45A10E744F15D6D65A185F6F996B8F5EE4364915B25EFFE02193D64C95AC9E01D26F75FE4E5981E886A7F655D21C4F3D27E9F114EFD4BAB249F51261CF20D5480BD6901F981B69CE3F684C912BF8679263E787D6FAC25E512CECB961F22A62E2BA41BA7617BB500346AFDF856BF66579E5DD5CE948BA032FBA38338CFB4BE091FBEFF55B86609433D5C9FA3F6115695075B80571B081197A4C7E83719E4E78DEBE4C124D7FC9322F9C7CADA480D0A13101C8360D92A6F3C42F2075B1607F1381D7BFF5517CC3C318929258494F758B3A21B8971D8698B5181D4F9D9F911843CEE36D9F60DD692FD9923A9D00B165723A632497BE194CA27A2867A302655FCEA6598A146CC01495E98BB5845A357D81E54AD13C05F66B65CBD0A891EA5A65A6138F7179869D2009D560DAD04AAC04D30CE3886A680CA2A2FB936A956AEE2A3C7C698B361CC195B550A2756E8D9550B5A2AFC50A45295AF1BF54902296307BD7B2DA448DE72343398614F929FBC242BA7A27586C0A7A6740FDA9FB7DAA7837307CFA77470BC4A474B7913F369DBBE3D1657F93602872D6E795AE526B724D6B26C90D3727EA01BA9B8C661DC04FD7DE0BE5B118EE4CD878E1F995CA835079F195CA2DA9DC57625B11B97C903C336DAC72B7D4BA6EE96B9A10C6C113D68C93D47457CBE327921A9788B0E331659AB02ED4BF534EEAB1718A2E184BA1F1EAC25E46CD5037286AD066334D98C46F99EEDE43699031B3D18DCB154C801B86B049D3658571358421274CCB86340690F4A12C86F65A1447343D7236650D8E4D19998515B571EA0FCD9AAAB880E9BBD3D365CC03394FEDF8725A2AB326AEEA3895E59929539EFD29D4A5B40147A22F6BA2E98E51534E872BA7A02BCD99725ACAF28FE6582E4CB972F1A7D0955220EA91E8CA3F9653391DA69C82AA34E7C95155A5103E4CDF76C57217E2FE2BAA73B1B7F1FBD709DD7D7D113C7CE1784F09E693E2A143E824D71FD1CE5B70BC7ED6E2BB76CEB287C584A5E2D7CF5876A85DA6A6FC9072521FD6953EAB5999EDA28C69AAEAADC263DFCF87A567D41EA1333B8CCE9A508A5B6EBDA8C06C905A34B005E9A3618D83941D6219415199435653354F7835756624B333C972757D1083531EAAC4F89E48D15B25B63648ABAFDB1569C6FD2DB68FEA6B7DECF1B00BADBF26B72B62A949BD1A66FFEB4D4C631AEAB0E4AB6AA0D9914F9D1836A8DE9808F184C29486852F27C06F67A63493FD94BE8866CC6BB5A9A8E371D9214966A9DCA6A2D516A6245B0C453263269B86261B8460165529E534587CAADEC52490B8F87505B3C0DF8358967FAA983D4FD33E37F126A90EF70246551729ED18018FE462A728D80017E1CF24293BFF8B5ABF80700749C2CF13F46EE2FB1DDAEE105E328C9E42EE92805C0FD4CD9F97DEE4715EDE6FF3BFC9D4C712309A0189BDBE8F3FEC82D0A3785F2BC2173520C8BD43991340F61291DC00FF8D42BA4B62434025F9E875C9238CB6210696DDC76BF002F5B835D390A7D8F22A007E0A229682450B4D53C4333353E009D811FBF9F04FCCAE5EF4FAFDEF61D11DE008870000, '4.3.1')

INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion]) VALUES ('201211281244264_AutomaticMigration', '2012-11-28T12:44:26.452Z', 0x1F8B0800000000000400ED1D5D6FE336F2FD80FB0F869EEE0A344E7CC0225D382DB2CEA617B4491671DA3E2E18895674D5874FA2B3C96FBB87FB49F7178E1425999F12A92FCBEDBE2CD61439331C0E6786E4CCE47FFFF9EFF287D7289CBDC0340B92F8C2393B3975663076132F88FD0B678736DF9E3B3F7CFFD7BF2C3F7AD1EBECD7B2DF82F4C323E3ECC2794668FB7E3ECFDC671881EC240ADC34C9920D3A7193680EBC64BE383D3D9F9F9DCE2106E16058B3D9F26117A32082F90FFC7395C42EDCA21D086F130F8659D18EBFAC73A8B33B10C16C0B5C78E1AC9F410AAFE0364CDEA077720510B8745D9865CEEC320C00A6670DC38D2571A7DF11E29C0A2D46FC111388DE1EDFB630477EE1DC621C20F661BA0A031823B633EEFE137CE31A70D3A734D9C214BD3DC04D0102777266737EE05C1C598D6307113A2E9C9B18FD63E1CCEE7661089E42DCB00161069DD9F6DDFB354A52F8238C610A10F43E0184608AD7E9C683F93C0A7EBCDFBE3363C977F3D30561C91CC4718200C28B2E512ED079E39564AE518AA5C7995D07AFD0FB19C63E7AAE48BD05AF650BFEAF33FB250EB0B0E14128DD41766AF4773DCA9F41862E5D14BCE433A4C8B140C0472C5AF79B4D06918259F5207FC9607AE993F51D7B3204B3C15A0B40EEC04BE0E7EBA300E7CC1E60987FCC9E832DDD1927821C7FA61DAFD3247A484259CEF3EF9FD7C92E7531F6C7A4A6D323487DC27296C4E57CBF91CCB6574ECFD7CDD5717361341DE591FC3BFA26F827C89E4747BA06E1F8DB9DCC94C852967D49D269A94E6BA54980DDED3C1F7A75A08C96026F875D66A90345C14D90ADE076DF2D979BDF0F82F726C3984BAC1F12AC9C416CCDB1EB10F8B69477A5BBD29D230BFEC70804E1E858F132795110775DA89BEC03B619FB6D660C47EB2660CF3B862EB66AD49067FDB90CA53750EB32947E8529B9F75FF0EC7F4C93DDB681D2BCCF67D23DCD94A4B21DF4B472BD6C8935A793F0A28ECCFC7B1395B4932D919761987CB1E16931A08964B65B13E55C5FD504ECBDC81CF05737723043DDC23BEC6EEC566192B5507E0294C7641BB896B49F7725FD3718E2A51B9F659FD2E005ECFD92D68627C68E225C61326A6740296226F0AEEB8AA710E05D53B7BF9460F4F68E023451745557AD8E2B7AE84FC77C37D5F9D84035179A7618CDDC40BA528BDB186B33CA4DED7403B5823537A53387E2C31A4A7DF8991A1491C2F283DAC2555F6D8DB2F1929B390E0D6CD3AFAE9DDDF5E157837BF84BD1F5EEE95FD8A31F1D2F91C183203DCC896EB51A1F6512A343DC4CDF6477F04B570FE2B767188B4E67CB3BFA5C6B59BB0496D7ED766E45611DDADB0FA58A96AC4B3F97FF18ACF2045FB46B69B1BEE4BFCCB2C40D721A94E7B3CAC5E2A7F531F66666FE16DD07B25DC41B6017A2601B062E26EBC2F946625D238ECAA02B7050EEF1284E4F4ECE242CD8CAC194181B10E2CD9BA1140431924D6210BBC11684460409A34D4D2A59A40A91F8E50A6E614C8CA211DB4D2860FD7699900A9F60F59BD8B59C33126525689C6B6C28096A3F790091535F9518CADD37E2566CCBA2C20737A45974C807608B7837370E432A555D4BA5ACB705EA7C683D73F92C61CAD49E758F48C8682A47E4AA09E2BD3370383D531AD4A6E5E5AD6B2F12C35FB51FC65609648C292E2C474DF0565EDF148C9295351ADE0C1DCCFEB0AF4A8DB42AA35214B416515A6DD8A17CC53264C7992886CBFBF80A8610C119796E27B1732B90B9C0930F17D889F6FA741F15D318D57954ACD4D4B6283DB69073351E01534930C981FB550CF5A383D61055AF12C5CBE9FE10A4134649F67848C56D9E1E0E95B80628E5539E1E4CA1291AE0ECAF45D5907C598419360B7014D7EA4CE7FA0B78510E8CCF87D58CF64C9184CAF820C8002BD649DCBFFCECED39C3DFDF37B2477FA6B13ED5746294F2F8323CB7CA3783463EA90E3616479B4EBC11CE304371657FBFA4E186FA546370AE6128DEEB83A6F94B2799461E769838D589FA79CB6E45B36FDE76D69CCB30FC1630D514962AA247DD309E52E042936A38A27536CDDD4D661A95ED376189CAAFECC092F2D6B5725FAA6FCB394D9B281A96734D7EC5F2166CB741EC33F91645CB6C4D932D56DFAEED5329220A63EE668A8C8A8ADA0A1336B278EF085FC96B8707AF83344324C5E309906781951749DD4C9DB5121DEFB3C9AB567A3A657FF2FFE2614D937822B979B2975B00BBC6138D88A79C3F4C8A4AA60EC28C64C28010A4AA77D05512EEA2B8C67BD78F27EF93EC70F2DB7C341F44CCC2E1BF984364D22F58704CB31D2C893FF9E6D330693917D6493A8048E2219DE078693392459D76EE22892AF5662387EAF1D394421A8AC68EA72DE61068D6010B81B69843A029042C04DA6247039B0F2052C37E3BE40E654308457865BB05DF8A787F8E73459B8504E491F79C04E42DE610AAF07D1648D56821C9341C9F1366DA640E8346E3B320688BCD7E2A035CF85D55B69A432A622B58304593154F68ECBBC015DA6803A70C7EE70195AD9351E8859BDCAF46571EDF6C54BA06C0503ABD5F3DD15DC797B1C32C8CB2CD1C4A113BCC02299ACC6154A1C02C94AAD11C4E15DACBC2A91A2DF61513DBCBED2CA6DD82CFCCCB3FC7EBE23A6D5ABE5775BAEF6FB38A51903938A35DAA1A394D97AB8A31E4EC76D96861EAF29841CED4E52D761014468A69B610DD9520B22BABD165741E07A26CB4317379B41D6FE3F2260B159307DB71FA256F3187B07F5667A13C2449A4DBC147730CE32F5414FA4077236F6DAE85F1F5A6B9F6EC45AE935451EBF5F7FA326BCD74C9EA1920FD52E70F9525886E746A9F25CDE9D44B929E4EF152ADAB98944F11F602528EB4100DF985B991E7FC8BC614A5827F2739767968AD2FEC15C5C25E1A26AF2226AE1BA47B77B14B65C0AAFB77E19E7D59DC7937173B922EC169176786697F093C7201BE7ECB108C72A13A59FF3B2C430DCA0EB7200E3630438FC9EF30CE330ACFDB574AAA3260B2CC0B275F2E29207C68CC01B2CD84AC327AE21790BA7863FF2D02AF7FEFA3FE8687292455B1929E4A17752270BF771866D652743CA57E46120C3995B77D8E75A7B564ABEA7402C456CAE94C915CFD66B01DD543451B1528FB8A36CDBB4821064C5D99BE444B2857D31758AE1ACD53603F57B6128D9AA8AE85663AC918976AD809925010A60DAFC46230CD308EA88CC6202ABABF5DAD52CD5D370F5FDDA28D4470952D94649D5B532514AEE86BB2425D8A56F22FD5A48825CADEB52C3851E3F9C8508E214B7ECABEB090B1DE09169B85DE19507FEA7E9F2DDE0D0C9F01DED1023159DD6DF61F9BD1DDF1E8B2BF4930DC72D6E795AEBBD6E49AD66C2737DC9CA807E86E329A75008FAEBD17CA5331DC99B0F1C2F32B9707E1F2E22B975B72B9AFCC361ABA7C9044336DB072B7DCBA6EF96B9A18C6C133D68CB3D47457CBE367921AD7D1B09331659EB02ED6BF5352EAB1498A2E1A4BA1F1EAE25E464D5137286BD066314D84C46F99EFDE43FD9431D3D18D70D5BD9A4DAA60C130FAE230A230AE8630948469D990C600923E94C5D05E8BE288A627CEA6AEC1B12923B3B0A2364EFDA145531517307D777ABA827920E7A99D5C4E4B65D6C4551DA7B23C3315CAB33F85BA9416E048F4654D34DD316ACAE948E51474A5B9504E4B59FED11CCB85A9542EFE14BA520A443D125DF9C7722AA72394535095E63239AAAA14C287ABB75DB1DE85B8FE8AF25CEC6DFCFE7542775F4F83872F1CEF29C172421F3A844E7201122D5E2AF17AACF47B2D4E75C9132DC642F3EB51161D6A716A0A102991FAB0AEF899168DA25C50C3A48C99AAEAADA263DFCF87856BD49EA0333B8ACE9A486ABBF4A206B3216A61208A1AD13848E121561014B539643D55F38657536946B23B5D6B520D52DEAF0F6670CA43951ADF132B7AABC5D68668F57DBB22D1B8BFC9F6517FAD8F351E76A2F5F7E476C51A35B957C3AC7FBD8969CC431D967D6515343BF6A933C306D51B13619E509AD2B0F4E504E4EDCC9467B29FD217D38C65AD3617753C293B24CB2C95DB54B4DAC294658BA158662C64D3D0648330CCA22EA59C078B8FD5BB984412D35F57300BFC3D8865F1E78AD90375D5E726DE24E5E95EA0A8EC22E51D23E09164EC14051BE022FC996465E77F55EB5710EE20C9F87982DE4D7CBF43DB1DC25386D153C8DD1290FB813AFC79F14D9EE6E5FD36FFB34C7D4C01931990E0EBFBF8C32E08BD8AEE6B45FCA20604B978289202C85A22921CE0BF5590EE92D81050C1BEEABEE41146DB1003CBEEE33578817ADA9A79C8736C7915003F0511CB41DA52E52962CC0C0A8C801DB1C7877F6271F5A2D7EFFF0F20D366540C870000, '4.3.1')

CREATE TABLE [ReadMessages] (
    [Key] [int] NOT NULL IDENTITY,
    [UserId] [nvarchar](max) NOT NULL,
    [MessageId] [nvarchar](max) NOT NULL,
    CONSTRAINT [PK_ReadMessages] PRIMARY KEY ([Key])
)
INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion]) VALUES ('201212032205392_AddedReadMessagesTable', '2012-12-03T22:07:13.687Z', 0x1F8B0800000000000400ED1DCB6EE436F2BEC0FE83A0D36E80B8ED5E60E00CDA093CED71D648C61EB89DE438A025B6AC8D5E2BB13DF6B7ED613F697F6149BD9A4F89D4ABD5892F03374556158B55C5225955F3BFFFFC77F5C34B1858CF30CDFC38BAB0CF4E4E6D0B464EECFA917761EFD0F6DB73FB87EFFFFA97D547377CB17EADFA2D493F3C32CA2EEC278492F78B45E63CC1106427A1EFA471166FD18913870BE0C68BE5E9E9F9E2EC740131081BC3B2ACD5FD2E427E08F31FF8E73A8E1C98A01D083EC52E0CB2B21D7FD9E450AD5B10C22C010EBCB0374F2085573009E257E89E5C01042E1D0766996D5D063EC0F46C60B03524EEF43B429C5DA3C5883F6202D1EBC36B0273E417F6278C03441E4CD7810F234477C6DD7F82AF4C036EFA9CC6094CD1EB3DDC96207027DB5AB00317FCC87A1C3D88D07161DF44E81F4BDBBADD0501780C70C3160419B4ADE4DDFB0D8A53F8238C600A10743F0384608AD7E9C685F93C4A7EBC4FDEE9B1E4BBC5E992B06401A2284600E1451728E7E8BC712B323728C5D2635BD7FE0B747F8691879E6A523F8197AA05FF695BBF443E16363C08A53B484FADF8DD8CF26790A14B07F9CFF90C0BE45820E00316ADBBED368348C2AC6690BF6430BDF4C8FA4E3D19825963AD3920B7E0D9F7F2F59180B3AD7B18E41FB3273F2934E38493E32F45C7EB340EEFE34094F3FCFB974DBC4B1D8CFD216EE8F400528FB09C2671B5D82B929E7AE5F4BC29574FE5C2687ACA23F9777225F827C89E2647BA01C1F4EA4E664A6429CBBEC6E9BC4CA7B1D124C06E77AE07DD26505A4B81D5619719DA405E7063642AB8FDB5E572FBFB41F0DE64187385F5438C8D33888C39761D00CF94F2BE74D7B67362C1FF18023F981C2B5E2637F4A3BE0B75937DC07BC65ECDB4E128DD04EC7947D0C1BB5AB19167C3B90C9537D0E832547E852EB9775FF1EC7F4CE35DD24269DEE70BE99E665252E90E6A5A995EA6C4EAD34978D14466FEBD8DCAA29329919741107F35E16939A08D64BA5B1BE54C5FD904CCBDC81CF09B1B39DA46DDC13BECBFD9AD8338EB60FC38280F71E23B86B49FF725FD3718E0A59B9E659F53FF19ECFD92CE1B4F841D45B8C66434CEA0A0889AC0BBBE2B9E4280B5A649BFA460D4FB5D0150C7D0D55D9536AEECA13E1DB3DD64E7630DD35C5ADA712C730BE9522B6EB259EB51AEBB4FB750CBEDE6BA74E6503CD840A907BF141B0A4F61F541BEC3D55F4D3765ED25D7731C5AD8A65E5DB37DD7836F1BEEE12F4537BBC77F618F7E72BC44060F82F43027BAF57A7A9471840E71337D93DDC2AF7D3D88DF9E60C43B9D1DEFE873AB65EC12185EB79BB915E5EED07DFF909A68617719E6F21F83959EE0CB76252DFD2FF9EF2170DFB60AB5400EBC5D686953B91EE3A35649C96596C58E9FF3487A8AAF1D71761A1F23D7D2F3CA8B5989DE139ECE2E407E12F80E26EBC2FE4660552B8EDAED93E028748C45717A72722660C1020E53226720C0263E4329F023246A831F397E02022D82B8D1BADA4416A946C47FB982098C883E68B15D8702FA74271252E3E314BE8D5DAB0525514682C61CA03425417E9A1A41E4E4176A9A72F70DAF8A5D59549ED43469E68F6D23B085BFC19D8621F586DE48A5B8BB73D479D078E6E2895397A903DB1E9E90C94C0ECF551DC47B97F17076A672BBDA9697F5C1069118F641E6307B1547C694E2427354076F7D3698C3A664B41B8DBF0D1D6CFFA1DF1E5B6995C62E49682D63F9BAB043FAD6A9C98E335E0C5777D1150C20821609CA2011966B9039C015BD77EC44BB43BA8F92694CEA3C4A566A6E2A5A1C5BC8ED0B1E01534130C9B5CC0B1F105A0CDA4054BF5D95EFEBFB43904A1805D963219577BE6A3885C4B540A91E7CD5604A4BD102677F792E87E48922CC83A06E056460E84B031E14B5621C4992771CAA73F38B0F2F52DA47CD7A667BFE0AF2A97DA6A480954BCE9B0276F6E69C611F8C5AD9A33E1E191F907A314A7A121A9F5BD523552B9F6467248353522FDE70C7A1B1B8B2BFD05470437E40D238225114EF6D42DBFC8543512B0F7B4CBC30AFEA798B1E4ABB9BDF75D68CF731BE0AE85A0A431331A06D98CE2830B1700D1C51FAADFA9E2B358DDA8DD06189CC45EDC192EA02B7F684EA6FAB4591A75336AC168A849ED52790247EE451093E658BB529B27BD6DF6ECC7377C202C6C2C924293C35B53526BCC962DDE1BE92E735175EFB6986484ED12320D7D76B3714BAE9FA7D153AD6FD1357ADF276AAFEE4EFF2255791E924788CA2C35C02BBC6130D89D39D3F6FF046A609824552AF400052D96BCA3A0E7661D47010508F27CF0CF470F25B7F341BB54EC361BFE843A4F27D687054B3192C813FB9F22998B45A70EB249C6504F1100E83ACB469C9A2CA3AF791449979339143F9F8794A6111FB488F2F5AF42114692E3484A2451F4291B34243285ACC68A01350786AE86F87D4503A66958757B51BF0AD4C30613857B61948409EEAC14840DEA20FA1CE17A181D48D06925CE47F30C25C34E9C328D23F6810458B893E55CFE4AC5655ADFA90CA601E1A4CD964C49322D982E34AD16802A7CAB6600155ADB331E8A59B3CAC45971EDF4C4CBA02C058367D583BD1DFC657C1EA348CAA4D1F4A19AC4E03299BF461D4B1E73494BA511F4E1D4B4EC3A91B0DF48A0A2667348B6A37E0331544C0F0BABC4E9B97EF559FEE8753563E962A07A7A5A5B291F374B9EAA05666DFAE1A0DB6BA3C4895D9EAF2163308924D8A6A3610DD3527B26BA3D155382803A26A34D9E6F2F04E768FCB9B0C4C4C1EDDC9D897BC451FC2FE859E86721FC7A14A838FFD18C63C7B0C620E94E19539C83693D0387A2CB350453DF26B65661EA818461A10D53CFDAAB3D768925D40F50E63ECA471E39B1DB2C61337B94494B1B6F9354764AD9EA8AC9F00522B78FED25D81E847A7F25D5B9F4EB5FD50D3C95FA5F61593EA01CA5C40AA9106A2218628B4F29C7DC79AA354B0AF63C72E0F9DED85B9A1589A4BC3EC4DC4CC6D83F0DAC277A937B0FAD5857B5D59952F1DED35D584A78FA28B6D61DA9F7D973C7B6C5E3304C35CA84E36FF0EAA5895AAC32710F95B98A187F87718E589CBE7DD0BB2D5D91359E606B3AFCAE6133EB4E68F98265CD7E918D133481DACD87F0BC1CBDF8728F3E3620A49F1BD78A00A69BD08DCEB0EC5CC4E69246AD1385445B1890443AC18D0BD9443AFB5A48B77F5024417E4EA4D9158646B348D1AA070960C9479E1AC762D92880155BE6A28D1E2AA620D0596297AF5E89BCF952E782527AA6F3DAB5E32C66434F782C4D59DEAC22BBEE6543B8C23AAD6338A891E4EAB65A6B9AFF2B04574BA48045340474AD6B931555C7D9CA126CB95BFE924FF42E99B48A0EC5DC7BA360D9E8F08E5188A71CCD917E60A63F4824517BBE80D683873BF2F4AD10F0C5B68A2E70E44158FE8A27F74E1889E4797FD4D82A6CA199F577A68ED816B238CA2B96C4D03A51C75AB536002AEA34BD2FB08D9727F251FA0BA4F6A5F4F165DF7B3004BC57827F3D66BE7372E8FC2E5E51B97872F566294A05AA40D1C245F549928D02F45B65F1AAA227E586B9FB37A249E6A279BAA2EF8A74F08D72E87632663D2747F559E4DAFDCF26393145524A4C4E235C59C4D5A6942A33A4997C5D41112AF63D98A01CA204D5955420B57D3DBE5ACEA8E8C632F0E230AD35A084D4998D71ED21AC63384B118DB6B911CD1D4C4999427393663A417DCD5C5A93FB468CAA233E6EF4ECF57300FE43C7593CB7999CC86E8B6E3349667BA4279F6A73097C2021C89BD6C88693C464B391FA99C83ADD417CA7919CB3F9A63B9D495CAE59FC2560AE1C047622BFF584EE57C84720EA6525F262735955C1077FDC2CED79AE1D75F52658FBE8DDFBF4EA8EEEB8B10EE0BDB7D8CB19C140F1D5C27B1F88F126F21F16AACC5F7469CF272434A8CA5E557A32C3B34E25414FF9222F560530D43251A49A9AEA60A876D050E6578D80289460CD45E40596F192DFB7E1E2CDDB0EE049D995174D646525731E3ADA509514B0DB15788E1410A8CD18220A9C123DAC486F74219144515D3DEB5E74629E33904331843252B8131102B06ABB9D88568F9DDBEA4A0C070931DA2CEE2106B3CEE449BEFE4CD8AB22AB2EDC659FFE62DA635F3785CF655D50ECDD827CF051CD56ECC84795C095ACD12B73390B7335D9E897ECA504CD396B5C6ECE3E9A4EC902C33346E73B16A4B5D962DC76299B690CDC3928DC23083FAB362E6333EC2EF22123B5EFCBA8299EFED41AC30CC083ACCE1BDEE73136DE3EA2681A3A8EA22C42A23E092F4FB14F95BE020FC99E4E1E7FFADDAAF20D84192E3F508DD9BE86E87921DC25386E163C0DC4890BB8826FC79915D96E6D55D92FF7F7F434C0193E99370FBBBE8C3CE0FDC9AEE6B49ACA40204B9E42883C9C95A221254EEBDD6906EE3481350C9BEFA6EE601864980816577D1063C43356DED3C6439B6BAF281978290E660D15267A662CC140A8C801EB1C7877F627175C397EFFF0FA54FD0CE658D0000, '4.3.1')

CREATE TABLE [UserReadMessage] (
    [User_Key] [int] NOT NULL,
    [Message_Key] [int] NOT NULL,
    CONSTRAINT [PK_UserReadMessage] PRIMARY KEY ([User_Key], [Message_Key])
)
CREATE INDEX [IX_User_Key] ON [UserReadMessage]([User_Key])
CREATE INDEX [IX_Message_Key] ON [UserReadMessage]([Message_Key])
ALTER TABLE [UserReadMessage] ADD CONSTRAINT [FK_UserReadMessage_MessangerUsers_User_Key] FOREIGN KEY ([User_Key]) REFERENCES [MessangerUsers] ([Key]) ON DELETE CASCADE
ALTER TABLE [UserReadMessage] ADD CONSTRAINT [FK_UserReadMessage_Messages_Message_Key] FOREIGN KEY ([Message_Key]) REFERENCES [Messages] ([Key]) ON DELETE CASCADE
INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion]) VALUES ('201212041337074_AddedUserReadMessage', '2012-12-04T13:39:15.596Z', 0x1F8B0800000000000400ED5DDB6E1C37127D5F20FF30E8A76C8068A459C0508C510279646585C492A151E24783EAE68C7AD397D9EE1E59FAB67DD84FDA5F58B26FC36B936CF64DB65E0C8B4D168BC5C36215C9AAF9DF7FFEBBFCE5290C668F3049FD383A734E8E8E9D198CDCD8F3A3ED99B3CF363F9E3ABFFCFCDDDF96EFBDF069F667556F81EBA196517AE63C64D9EEED7C9EBA0F3004E951E8BB499CC69BECC88DC339F0E2F9E2F8F8747E723C8788848368CD66CBDB7D94F921CCFF407FAEE2C885BB6C0F820FB10783B42C475FD639D5D9350861BA032E3C73D60F2081177017C4CFD03BBA001938775D98A6CEEC3CF001E2670D838D2173C73F61E69CBA5BD4F17BC460F67CF7BC8379E767CE07D40788B63059053E8C32B232AAFE1B7CA60A50D1C724DEC1247BBE859B9204AAE4CCE674C339DBB26E4736C27C9C395751F68F8533BBDE0701B80F50C10604297466BB376FD7599CC05F6104139041EF23C83298A079BAF2603E8E521E6F776FF444F2D3FC7881453207511467204393CE71CEF079E5556CAEB304A1C7995DFA4FD0FB1D46DBECA166F50378AA4AD07F9DD91F918FC0861A65C91E92432BFE6EEEF2779066E76EE63FE6232C3A47808077085A379B4D0A3381B09A49FE91C2E47C8BE777E8C1E09E35E69A21720D1EFD6D3E3F0272CEEC1606F9C7F4C1DF152BE388C1F1E7A2E2651287B771C0E33CFFFE791DEF1317F57E173754BA03C9168B9C6471393F2C24BDE595F3F3BAB82C1717EAC6128FF8DFC117C13F41FA3078A76B100CBFDCF1483196D2F44B9C4C4B751A2B4D4CEC7AEF6DA1D7444A6B2AD072D8A7863A90056E9C9902D77EB59C6FFE1AA5DFAB14F55CF5FA2E46CA1944C612BB0CC0D694735BBE6BDD3930F0DF87C00F06EF154D9317FA91ED445DA5EFD09E715866DA74A46602B2BC23E8A25DADD8C8D3EE4C86CA1A6834192ABB4297DD9B2F68F4BF26F17EA7E034AFF319574F5221AB640539AF542D5366F5F9C4B2686233FFAEE2B2A864CAE47910C45F4C645A3650B14C5653714ED5351DC02D045E4E6F0B15FCE788A3AB0BD8E76AC98D5FBE6A3726702E95571BB8372BA385696BBF53AF82386DA1B9192A77F1CE770D793FB565FD130CD0D40D2FB28F89FF080E4655EB5D3342562E5C21361A475070440CE08DED8C2710A055D3B4BE8464E49B754150474BD755A50ABAAC21D76E74359166D3D857CA6DA29F6D45C1BA700B32B134F438D7353214DC32A6882E9FEAAD6F0B3F171B0ACB61F541BC3DD75F4D3764ED29D7B37A146293CFAED9BEBB85AF1BEEF827BAEBFDFDBF903B3278BF1883A3743A8E3BBA5A0DDF651C65631CAB5FA5D7F08BAD05F1E90146ACD1D9F28221D75AC62681E15D81995951EE0EEDF70FA18AE676976E6E2E1059E1F143592EE5457A43A1DCCA3E3DC4D8C7EBC7B7947AC67237B4D51E47507ADDE704B3DCF15EA7A50ACAF918A36B914253109141ED3C4D63D7CF052D3CC7A85D119AA1F79137D3F34B0AD1F0F62392C93EC8FC5DE0BB88AD33E7076ED0CA3EEAD527E8A3D0327417C74747275C2F6895C00483150468934BB304F851C62F293F72FD1D08B418625AEB2E493C497547EC970BB883115E545A62D7E180F46F7946EAFE18ADA112D7724E20CA0868940BA98904B13FD903E4C4E7A19AB8FB815D8A6D4554FAAA9A3CB38E6B0F62610FE08711486DD23472C9DB370C775B683C72DEE7D6156AC7BA8765643095C34A55A7E383D13C9E9EA90C4FD5F4D256682788A1EFD3C6D9AB183686840B29519D7E6BEF680A9B92D16ED4FF3634DAFEC33B484A8E1B6EE2DAF1ADDB8D4C3CCAD5DB4630E49DBA9257E19B3C8130CA37AA6DC421BCC3D794F709BB3E9737D1050C600667F8B1117E39BC02A90B3CDE4141DE85D7A55D2D18C6A056B560A6A6A6BB0A7F0E1FCCA11630E180894FEC9ED887CE45A335CCEA6BCDF2DDC8C13B948191C31E4DA9BC0E90D32910A7A0523D6490932955A882CEE11C474C69CB439825411F077164C82319961431630C4B822B3EA272F365200B296D1FBC1ED941BE1C3EB59D6D825839E5AC2AA0476F2E19FA2E51291EB9DF68EC395A094AE822F62FADEAFE52292791F368E03E5AC986F113FB92CAE1AC5B220DB1E7A8E13B121C1F74826AFC9CB7A894A1C5C00BF52A1F376FA1A8FD9FB6A3A6AC8FFE9780AEA63054111DEA86E19482E026A3412E0AB3DED4B0570DCCD482D7C09F8DACA8F7B00D5292DAF8FA563E3192DAE4D2918DC89CB7804F750B505B8DF5B7E5BC88D52B0B96734950DFF203D8EDFC684B04F99525B37511E1B7FA716D1EBF171634E66E2A08E3ABB9AD7B4206090203F315DF527BF0D24FD20CC715DE037C07B2F242AE9AAE8D5C75479BCAFCAC559661551FFFBF7C10218976E4AC6BDEB928895DA28186D841C92FDAD805D1446186C32F410012D1BDDE2A0EF661D4E034C9DBE30B2FB239FE5BBF351DB942D2A1BFE8532462FE487244B1192D4E3EF9E29308693967E689F3FB3878708E338D362D2CCA76321B248AD49B090EC5EDA789C2E20931D9BE28D1A75084BA91148A127D0A45DC1A49A12831E3810C4263B921BF8DB942C9A7DF2CBDAADC406E65901925B9B2CC000179B8178580BC449F421D334612A90B0D905CC48051602E8AF4691421602489A2C4643D550F36E8555595EA532ADFC49164CA2223991401578C548A42133A55C4154DA82A9D8C422F5D8A6E35BAD0D53551E912027DE9F46EF584BD8EAF623E481A55993E9532E683245216E9D3A84338482A75A13E9D3A2483A453171AAC2B2226835A5944B9819C89972894ACCBA3C769D95E0DAE72DBC5CABEEACBC969AD5251CB699A5CF5DB706ADFAE0A0DB6BAFCAD37B5D5E5256614049B14516C00DD1503D99551EBEA553545A22A34D9E6F257D2F41E971719A898FC4D21A55FF2127D0A87671E2495DB380E652BF8A5BB618A93B316EA40FAD03727A952098DADFB520BD5FB5B76AECCD403F19A96244414DB40B978203B3C6EE88338C13E22BBF53236F398F6CD265DA3CF8E8F214593D37C77C68B560F6CAB0790C95544FEAEA02261C7A7F415813E9F720D24E7933D8CB5854975DD670E90AAA50134F807214A99D3B7865344057D17F9D2F1D05A5F982B8A85391A26AF22BE12DD20B8F5333DFA659A371EF34A6C8C26714B2F0DDB0ABD8DC04D59B4C445751DDE392CB86B3CB64A6DD7D4D779CCB5DDB2BC425327ECE4EED48A2ACE0CF1FEE87BF83E6DFD9C6630CC9175B4FE77503D18AB2A7C0091BF81697617FF05A33CB1C469FB6C9F7580589A7AC1E4537EFA580ECA1039D3841875C459F4081217ADEEEF43F0F4F72E72C87988439CD935EE28FDA6158387154E08B355909B1C1A63A5AB1C08187C4697F6A976ACE692CC0C694588CCF668CD119FC1B1B715D54156461129F3AC8CEA55248001911BB12B68312917BB224B6554BCF7CDC74A66531433659B2CD10A6354C6092B4A4C52C336B262131AAA69BCA06C6ABDA8E8EE56B54835DB2E1E3AC9591B445009CE846C9D1A73C5E42FEB6AB04C7AB256F8E75293451C676F5AE61D6BB07C782A2F2159D2946D61267191152D32199135A1EED4FD2169901D193A1190E50E4424F769B3FEC83C1896AECBE1804973C919FB2B16AB76E4F42FBDAC5C3A6D8B1447ED52B1D8912B6E8B8CECF796768DB51FAA381B1537901D9DA9414177D7DEA1A0B9E8CFBD575E69BC4AB917292F5EA5DCCB5195C526D0705ECE576E38B9560BD65C18528DDE8D4CBB0ADF2F02854689A6978606D92510B00BD297440C681920338BB07CED507CD9CDCBF07944B4B3A899614C9825461685689592E4A52145F6F659B08B34BD321D3441914652AB3693A903926DCB6C471D64CF1B321991565F4D6F0D2695AEAA1F7D310E1486D5109A4898D61EA27C76D785B2E8DB6A11B8BD72E61AB1FCC29591DE63CC368ED2D8D014BD9A99BE393D5D608E643CB5C3E5B45466C36BD497A92C4F744179F24DA84B6E025E88BE6C7883FC1235E5745039055DA90FCA6929CBAFCDB05CE8A272F14DE84AEEF9FE0BD1955F9751391D504E4155EA63722AAA522F8E61FAC8246F93A44C7D95673F8A2096491F04E985A8B43BD1FB5610A739E5A3614D113534501E693E951E3BC18284CBE4D5E3E12A5676395904129D39DE7D8C0051DCEA3295F8DC86D27E0B252AEFB5F8DED8A7389BA2B4C7D2CC9577595668EC53920756D8E91636A5B3967623CA9AC9D2A7B259737D505F45FDD0B1834602D49E40516D112F877A5B58FA9CED193A31E3E844C5525B98B1A6A109530B0DD89BC090D3D5CD8BAE1138B842FB4CEA3D2570259128C871C82BE586D719222A928CFAD679907B4929DF8530284D294A31D691283ACBFFDD8669B1DDC53617607CDC9CDF5DCC71BF036DBE0135FB810049D4793FF3DFBCC729F3B2F42BBE2A9BB499F8C411F1BDEA8D89088FF93904CD9F5B9800DE4E7465C61B4A5D094D1B6B8DB9598643D9982233546E53D16A0B5D912DFA129936C8A6A1C9C61198F4F8D2E857220CF0D685F004CE863C274DAFC2D2C098DE115D5B1B6A500119FC5A049F4E6639BFDD473872AAF8EB02A6FEF64062896846D0A5CEA2EA3A57D126AECEC5188EAA2A5CB840063C9CD828C9FC0D7033F4196738CA7F8EFB4F10EC210E9CBF87DE5574B3CF76FB0C0D1986F70175C0868FD69AFACF7F1283E67979B3CB7F51BE8B2120367D1C6C7613BDDBFB8157F37D2988739090C0677665841E9ECB0C47EA6D9F6B4AD771A449A8145F7DD47807C35D8088A537D11A3C42396F6A19D2125B5EF8609B809094605152A7FB403D135DA00EC81687FED09F08AE5EF8F4F3FF011761BE9E179D0000, '4.3.1')

DROP TABLE [ReadMessages]
INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion]) VALUES ('201212041402185_DeleteReadMessagesTable', '2012-12-04T14:03:12.346Z', 0x1F8B0800000000000400ED1DCB6EDC38F2BEC0FC4343A7D901C66DF702412668CFC069C7B3C64CECC0ED991C035A62CBDAD1A357523BF6B7ED613F697F6149BD9A6F91A2A45627B9046E8A2C168BC57AB05895FFFDE7BFCB5F9EA370F604D32C48E273E7ECE4D499C1D84DBC20F6CF9D5DBEF9F1B5F3CBCFDFFD6DF9CE8B9E677FD6FD16B81F1A1967E7CE639E6FDFCCE799FB0823909D44819B2659B2C94FDC249A032F992F4E4F5FCFCF4EE710817010ACD96C79B78BF32082C50FF47395C42EDCE63B10BE4F3C1866553BFAB22EA0CE6E4004B32D70E1B9B37E0429BC84DB307981DEC925C8C185EBC22C7366176100103E6B186E0C913BFD0923E734D3A289DF2104F397FB972D2C263F77DEA33940ECC374150630CEC9CEA8FB6FF0856A404D1FD2640BD3FCE50E6E2A10A893339BD303E7ECC8661C3908E371EE5CC7F93F16CEEC661786E021440D1B1066D0996D5FBD59E7490A7F85314C410EBD0F20CF618AF6E9DA83C53A2A7ABCD9BED223C94FF3D30526C91CC47192831C6D3A873983E7B557A3B9CE53C43DCEEC2A7886DEEF30F6F3C706D5F7E0B96E417F3AB33FE200311B1A94A73B482EADFCAD9EF27790E5176E1E3C152B2C27470C01EF116BDD6E3619CC05C45283FC2383E9858FF777ECC5E09935F69A0172039E02BFD81F0138677607C3E263F6186CCB9371C2F0F1A7B2E3559A447749C8F379F1FDD33AD9A52E9AFD3E5174BA07A98F494EA2B89CEF0F92DEF12AF0F976B82C0F179AC6921FF1BFA31F827F82EC71F449D7201CFFB8E395625ECAB2CF493A2DD1692C3431B09B9DE7434F054A6B2BD071D86586329065DC2437655CFBD372B1F9EB20F35E6768E67AD6B70912CE2036A6D855087C53CC6DF16E64E7C88CFF2E024138FAAC689BBC28886D37EA3A7B8B74C6FE9869C3919A09C8F28EA18BB45AA9C8B3FE4C86DA1A509A0CB55DA18BEEED67B4FA5FD364B76DC1B4E8F309774F3321AA640739AE542F5364F5F1C4B450A1597C6FC3B2EC648AE44518269F4D685A0D684399ECD68639D5D77401771078053C1FB6E05F701CDD5D803ED74B6EFCF25DFB31810BAA7CB38107B3323A98B6F69A7A15265907C9CD40B94FB6816B88FB6B5BD43FC2106DDDF824FB90064F606F5475D69A31B272E10AA1A15C418911B18057B63B9E42804E8DEA7C09C1C895750950474A375DA502BAEA21976E74379164D3D02B959A1846ADB4A02E54412696861EE6BA46460BB68C29A28B67BBEAF3E1A752A1B018D61FC4EAB9F96AAA90B5B75CCFEA69219B7C77CDF4AE0FBF29DCC3DFE8AE770FFF42EEC8E8F3621E3CC8A487714757ABF1A74CE2FC10D7EAD7D90DFC6C6B417C7C84316B74760C301452CBD824308C159899159576E8AE3F84229AD32EFD442E1058E1F543D52EC5451AA16855651F1F13ECE30DE35B4A3D63B91BAAA3E32EB22C7183025BA173D9D8873421DEC5DE4CCF582C0F31AFD4D1E9DD8579B00D0317A175EEFCC011BB758E86248239CAADA7A7383D3939E366412A1AA658538210499E2C4F4110E7BC3E0F6237D882500B2166B4AE3D8037A99988FD7209B730C61A5D8BEC3A18904E078F48331F63B2B4916B392738CA88D128BB5E9313C446FE002C27BEA4D2E4BB1FD8A3D895449503A18933EB4D0C4016F656741C82347A468925AF7418EC7C68BC72DE11D2256ACFB28745643491C3525567E2BD25733839535B036DDB4B9B06BD700C1DE4388CAE62D018935D488AEACCDB98AC53504A46DA6878357430FDC35BADAD182BC223DDF0D69D46469ED6D3DB853064A0B31557E143290131AA87835DC8210CAC6AD2FB8C3D9FCBDBF81286308733FC02043FE75C81CC051EEF3222EFC2EBD3AE162C6354AB5AB05353935DA53F876F4BD00898728C89AF519ED9D7A7E5A035CC9B585315CCDF7B873266E4788F8654DDD1CAE1941CD702A58E2ECBC15422B405CEDEB91643F2791626C8CCC011044B88CEEAB00ACB07DA8E73B3A23D5138A6D2F6900960D53EB1E7975EBD3965E8A84C2B79E4CE9EB1BB674528A15F373CB5EA48502B9D441E9F81CF67451BC6B91B8A2AFB5B430935C4EE9E86C34760BC97076DEBE75CBC561A5A2CBC9489F275F36645BBD3D275D594C930FC11D095148622A247D9309E5010DC092BE8D2628B9B5AE36D0B3335BB35F8CF8656D4CB420595A486B9BE694EACA4B193746823B2C12DD8A7BEBA6F4CBDE6DB725E663D550DCBB9243D6AF91E6CB741EC13E95255CB6C5DE64AAD7E5C9B674245258CB99B0912A21A6C9B999041829881F98AE37D1EBC0AD22CC7195A0F0007C6565EC475D3356CEBE968FB96DFB5DA2AACFBE3BFABD0B2246F8C3389798FA0027685161A61AFA208CDB3074205618613D9400852D14B805512EEA258E1E9C8C7E3083D391CFFD61F4DE7009070E82FFA1089EC29121CD16C068BA34F71F824445ACE997DE29C358E3D386F97E6362D5E9469321B4E148937133E148F9F2617968F31C9F1658B3E843269888450B6E8432833804808658B190E643A0F8B0DF9ED9027947C44CBC2ABDB0DE856A5EB5094ABDA0C38A0489CA138A068D187D064DF90409A46034E2EB36928662E9BF46194C9342488B2C5E43CD54FBCE85355B7EA43AA5E179160AA26239A94A92B0C55CA46133875EE0A0DA86E9D8C40AF5C8A7E25BAD0D53511E9120043C9F47EE584BD8CAF5FCF9330EA367D28D5EB791248D5A40FA3790C4F42691AF5E1348FDB49384DA3C1B9225EB753278B6837A033F17C84A27575F5382DDB4BE12A773DACEC3BE0029CD629158D9CA6C9D5BCB2A5F476DD68A0EA8A57B394AA2B5ACC20089414D16CC0BA2B86655746A3EBF7A91488BAD144CD15EF4D691D5734198898E2B929255F8A167D08FBB7192494BB24896427F868DC30FA4245200F64D10B6375CD8C57AB66A5EF85AF9344791BEA18084F5A3D59B27A04B97CAB8BA06E0DC20E4F6908571F4F3927C9F1642FD56CD9A40EDB9833483DD28035F8687C2BCDE9E8CF14B9828E291D3B3F749617E6826261CE0D9317115F886C10446F4CAFF098E1CAEB3A8909A922B734F8D395E85D086E8AA2255FD461CDDED9820BC7B05D1ABBA609CB30E19765150A692F61C7C546CA2ECE0CE1FE1478382EB27EC97218159C75B2FE7758BFD6A93BBC0771B081597E9FFC05E322D5FA75F7FA774D6A609679E1E48BE005980EADC991A629E24DAA63FC0452179DEEEF23F0FCF73EAA2A7908435CEB30E9A9209D1582FB134E105389D1F114701B8931F81A07DD8B4F58ED25592BCD0A1059FFCC1A23BEA6D96027AA873A652250E675CADA4F91800D886A617DB1165384AC2FB0548DB187C07CAD647D313152B6E5C3AC788CCAC1B682C494F9EA422BB6C4573B8C23AA2F348888EEEF548B44B3EDE1A1CBFE74E108AAE48F10ADD7C65831157DFA5A2C53B0A713FF73C57A620EB3571D2BF1282C1F1ECA31940F99B22DCC94F2B0824596E7B006D49FB8DF97D1B0034397C6B0D44044B98B2EE78F2C7561E9BAEC2F98348F9CB1BF627B6A756EEFF54E72CB859A7880ECBEA55D06D0D375B742692C86F3095BEFC1BF5179102A2FBE517990FB0D0B9DAFB864E53B2BAE3BDB096B4E0C1E0685802D4DFB4AB82DB3040E92FF2ACD0BB04BF9B54BAB953C17D6B237671689B4DAC9B3B2EBFAF133FFB5EB1E99F198B0AE832C05C9AA88C0B1718AECE1A3408BA89E988D5A5244A30C4D97CDD46112BF637D921EEA5D8D593E446B2E55807A52056686911787618571258426274C4B87B4BED5EA43580C6DB508DC5E39724A5E3E7261A4F782AF8BA37468D6143DB598BE393D5DC63C90F1D48D2FA72532154F188F53589EE932E5D957212EB90D381279A978B87A8C92723A5C390559A9CF94D312965F9A61B9D0E5CAC557212BB937DF47222BBF2CA3723A4C390551A9CF935311957A8FDFA7CF996434498AD41779F7D392F930E98B20BDBC866E377A5F0BC7696EF9C178AD25D564A4CAAF7C1D2D7683052552C9D0E33E142B0B4E96D927E78EF790208628A3BA4C27BEB09974DE5288CA672DBF2BE714975293CE5899B9F229AB0ECA392545208593FA505580563A8DA8649E7A51DA4415F516E1B1EFE7C3CA0FEC8ED0991946676D2875DD7AD65C33416AA1C18A26ACC1C94FF54150320DEE40E8180E8183545424395150748C17948A1713222892BAD4D6854907A9F1DC073128E925AAF9D313297A2BC8DB0569B12D24A8A0D2DF62958CAF5984B78F3D1E76A1EAA8A459C56E49FAF030FBAFD671AD053686255F5DDED58C7CE2D4E641E5C64488C7D427D7AC7F3E017E3BD3A5196F28F545346D5E5316D9188FCB0E493243E13615A9B6D025D96228926933D93424D9610826BD52342ADB6EC06F7D104FE06CC88B8B0C4A2C0D1ED3BB36EB6A438D4A2083F2ED7C5D90E5FC6E17E3CCAAF2D725CC027F0F628960C6D0A5EE879A3ED7F126A9EFAA188CEA2EDC13FE1C78B8424D9A071BE0E6E8332E5553FCF7CB7F8270077106F403F4AEE3DB5DBEDDE568C9307A08A94B2F7CDDA59ABFA8514FE3BCBCDD16FF596E1F4B4068063819ED367EBB0B42AFC1FB4A907B200181EFD1AA2449BC97394E96F45F1A483749AC09A8225F73FD770FA36D888065B7F11A3C41396EED34A429B6BC0C809F8288A460D9D2D46D40331353A009C811FBF9D04FC4AE5EF4FCF3FF0198BA6E9FF2950000, '4.3.1')

